package com.rich.user.service.impl;

import com.rich.user.mapper.UserHouseMapper;
import com.rich.user.pojo.UserHouse;
import com.rich.user.service.UserHouseService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author minicoco
 * @version 1.0
 * @date 2021/8/18 18:49
 */
@Slf4j
@Service
public class UserHouseServiceImpl implements UserHouseService {

    @Autowired
    private UserHouseMapper userHouseMapper;

    /**
     * 收藏房源
     * @param userId
     * @param houseId
     */
    @Override
    public void collectHouse(Long userId, String houseId) {
        UserHouse userHouse = new UserHouse();
        userHouse.setUserId(userId);
        userHouse.setHouseId(houseId);
        userHouseMapper.collectHouse(userHouse);
    }


}

